/**
 * 本地静态路由配置文件
 * 不需要动态注册的路由（公用路由、动态路由）
 * 公用路由：根路由、登录、404、403、500等
 * 动态路由：组件控制权限
 */
// config/routes.ts
export default [
  {
    path: "/",
    component: '@/layouts/BasicLayout',
    routes: [
      { path: "/", name: "首页", component: "@/pages/index" },
      { path: "/news/:id", name: "news", component: "@/pages/news/$id" }, // 放在末尾的动态路由
      { path: "/news/:id/:uid", name: "other", component: "@/pages/news/$id_uid" },  // 多个参数的
      { path: "/news/:id/settings", name: "other", component: "@/pages/news/$news_id_settings" },  // 放在中间的动态路由
      {
        path: "/dashboard",
        name: "统计分析",
        icon: "DashboardOutlined",
        routes:[
          {
            name: "分析",
            path: "/dashboard/analysis/:id",
            icon: "AreaChartOutlined",
            component:'@/pages/dashboard/analysis'
          },
        ]
      },
      { path: "/403", name: "403", component: "@/pages/403", }, 
      { path: "/*", name: "404", component: "@/pages/404",},
    ],
  },
  {
    path: "/login",
    component: "@/pages/login",
    name: "login",
  },
];


